package com.amoby.main.mapper;

import java.util.List;
import java.util.Map;

import com.amoby.base.common.Pager;
import com.amoby.main.entity.AlipayOrder;
import com.amoby.main.entity.Business;

public interface AlipayOrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(AlipayOrder record);

    int insertSelective(AlipayOrder record);

    AlipayOrder selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AlipayOrder record);

    int updateByPrimaryKey(AlipayOrder record);

    // 根据订单号查询对应支付宝服务窗活动订单 廖江红 2015-11-20添加
    AlipayOrder selectAlipayOrderByNo(String orderNo);
    // 根据商户唯一订单号查询对应支付宝活动订单
    AlipayOrder selectAlipayOrderByTradeNo(String tradeNo);
    // 查询出需要转账的商家 信息 廖江红 2015011023添加
    List<Business> needTransferAlipayBus(Map<String, Object> map);

    // 查询出需要转账的支付宝活动订单 信息 廖江红 2015011023添加
    List<AlipayOrder> needTransferAlipayOrder(Map<String, Object> map);
    // 查询出需要转账的支付宝活动订单
    List<AlipayOrder> transferAlipayOrderAll(Map<String, Object> map);
    /**
     * 保存订单的billId
     * @Author liaojianghong 2015-11-23 下午5:33:01
     * @param param
     * @return
     */
    int saveAlipayOrderBillId(Map<String, Object> param);

    // 分页查询活动订单列表
    List<?> selectByPager(Pager pager);

    // 查询对应的转账明细
    List<Map<String, Object>> queryBsbAccByOrderno(Map<Object, Integer> inputMap);

    // 查询支付宝活动订单
    List<Map<String, Object>> exportAll(Map<String, Object> map);
    // 查询出需要转账的商家
    List<Business> alipayTransfer();
    //根据转账id查询订单
    List<AlipayOrder> selectAlipayOrderByBillId(Long billId);

    //查询需要转账且可以转账的商家
	List<Business> alipayTransferBus();

	//统计
    List<?> getDataListFooter(Map<String,  Object> map);
    
    

    
}